package Job04;

import java.util.Scanner;

public class Circle {
    public double area;
    public double perimeter;

    public void getArea(){
        Scanner input = new Scanner(System.in);
        System.out.println("半径为:");
        area = input.nextDouble();
        double Area = area*area*3.14;
        System.out.println("面积为:"+Area);
    }

    public void getPerimeter(){
        Scanner input = new Scanner(System.in);
        System.out.println("半径为:");
        perimeter = input.nextDouble();
        double Perimeter = area*area*Math.PI;
        System.out.println("周长为:"+Perimeter);
    }
}
